import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'
const CertificateKey = 'token'
const TenantIdKey = 'tenantid'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function getCertificate() {
  return Cookies.get(CertificateKey)
}

export function getTenantId() {
  return Cookies.get(TenantIdKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function setCertificate(certificate) {
  return Cookies.set(CertificateKey, certificate)
}
export function setTenantId(tenantid) {
  return Cookies.set(TenantIdKey, tenantid)
}

/*

export function setId(id) {
  return Cookies.set(idKey, id)
}
*/

export function removeToken() {
  Cookies.remove(CertificateKey)
  return Cookies.remove(TokenKey)
}
